package com.lenin.omena.shared;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.lenin.omena.server.AppleMarketException;
import com.lenin.omena.shared.domain.Produce;
import com.lenin.omena.shared.domain.Site;
import com.lenin.omena.shared.domain.User;
import com.lenin.omena.shared.domain.UserInfo;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface AppleMarketServiceAsync {
	
	void saveUser(User user, AsyncCallback<SaveUserResult> callback);
	
	void deleteUser(String userKey, AsyncCallback<DeleteUserResult> callback);
	
	void saveUserInfo(String userKey, UserInfo userInfo, AsyncCallback<SaveUserInfoResult> callback);
	
	void activateUser(String userKey, AsyncCallback<ActivateResult> callback);
	
	void logIn(String userName, String password, AsyncCallback<LoginResult> callback);
	
	void logOut(AsyncCallback<LoginResult> callback);
	
	void getAllUsers(AsyncCallback<List<User>> callback);
	
	void deleteProduce(String userKey, String produceKey, AsyncCallback<DeleteProduceResult> callback);
	
	void addProduce(String userKey, Produce produce, AsyncCallback<AddProduceResult> callback);
	
	void saveProduce(Produce produce, AsyncCallback<SaveProduceResult> callback);
	
	void test(User user, Produce produce, AsyncCallback<Integer> callback);
	

}
